using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter35
{
	/// <summary>
	/// Example04: Angle of Refraction for Glass
	/// A light ray of wavelength 589 nm traveling through air 
	/// is incident on a smooth, flat slab of crown glass at 
	/// an angle of 30.0^{\circle} to the normal, as sketched in Figure 
	/// 35.15. Find the angle of refraction.
	/// </summary>
	public class Example04
	{
		public Example04()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Optics obj = new L.Optics();
			obj.AngleOfIncidence = 30.0*Math.PI/180.0;
			obj.IndexOfRefractionForMedium1 = 1.0;
			obj.IndexOfRefractionForMedium2 = 1.52;
			obj.RefractionOfSnellLaw();
			result+=Convert.ToString(obj.AngleOfRefraction*180.0/Math.PI);
		}
	}
}
